# sprite = codesters.Circle(x, y, diameter, "color")
sprite = codesters.Circle(-150, 175, 100, "blue")
try:
tval1 = sprite.get_width()
except:
tval1 = "DNE"
t1 = TestObjective()
t1.add_success(tval1 == 75, "Great Job!")
t1.add_failure(tval1 == 100, "Did you change the diameter?")
t1.add_failure(tval1 == "DNE", "Did you delete your circle?")
t1.add_creative(tval1 > 75 and tval1 != 100, "That's a big circle!")
t1.add_creative(tval1 < 75 and tval1 != 100, "That's a small circle!")
tester = TestManager()
tester.add_test_list([t1])
tester.run_tests()
tester.display_first_feedback()
-
Run Code
-
Activity Submitted!
Submit Work
-
Next Activity
-
Stop Running Code
-
Show Chart
-
Show Console
-
Reset Code Editor
-
Codesters How To (opens in a new tab)